import QtQuick 2.6
import QtQuick.Layouts 1.1
import Qt.labs.settings 1.0
import QtQml.Models 2.1
import Qt.labs.controls 1.0

import "../template" as Tm
Tm.Navigator {
    id: nav
    property string uid: ""
    property string name: ""
    ListView {
        id: listView
        anchors.fill: parent
        anchors.margins: 9

        model: ListModel {
            id: libaryModel
            ListElement{
                text: "个人资料"
                url: "../qml/PersonalInfoNavigator.qml"
            }

            ListElement {
                text: "签到记录"
                url: "../qml/RecordSignManagerNavigator.qml"
            }

            ListElement{
                text: "开始测试"
                url: "../qml/TestStartNavigator.qml"
            }

            ListElement{
                text: "测试记录"
                url: "../qml/TestHistoryNavigator.qml"
            }
        }


        delegate: ItemDelegate {
            width: listView.width
            onClicked: {
                contentArea.push(Qt.resolvedUrl(url), {title: nav.name, uid: nav.uid, name: nav.name})
            }
            text: model.text
        }
    }
}
